<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <!-- 求数组中的最大偶数 -->
    <script>
      let arr = [40, 48, 53, 44, 71, 41]
      //放数组中偶数的新数组
      let ouArr = []
      for (let i = 0; i < arr.length; i++) {
        // 获取偶数
        if (arr[i] % 2 == 0) {
          //在偶数数组中添加元素
          ouArr.push(arr[i])
        }
      }
      console.log(Math.max(...ouArr))
    </script>
  </body>
</html>
